
<template>
  <div id="centerCPoint">
    <div class="top">
      <span class="one">
        <img src="../../../wechat/static/images/wdyd.png" alt="">
        我的余点
      </span>
      <h3 v-if="price===''||price===undefined||price===null">
        暂无数据
      </h3>
      <h3 v-else>
        <span>￥</span>{{price}}
      </h3>
    </div>
  </div>
</template>

<script>
export default {
  name: "centerCPoint",
  data() {
    return {
      price: ''
    };
  },
  mounted() {
    this.findEsShopUserCoreById()
  },
  created() {
    
  },
  methods: {
    findEsShopUserCoreById() {
      let url =
        this.$CONSTANT.MY.findByUserPrice +
        "?sessionId=" +
        this.$common.getCookie("sessionId");
      let param = {};
      // this.$vux.loading.show({
      //   text: "loading"
      // });
      this.$common.post(url, param, res => {
        setTimeout(() => {
          this.$vux.loading.hide();
        }, 800);
        if (res.status == 200) {
          var bussData = res.data.bussData;
          this.price = bussData.price
        } else {
          this.$vux.toast.show({
            text: res.msg,
            type: "warn",
            width: "auto"
          });
        }
      });
    },
  },
  components: {
    
  }
};
</script>

<style lang="less">
#centerCPoint{
  .top{
    background-color: #FF585F;
    text-align: center;
    height: 183px;
    // line-height: 183px;
    .one{
      position: fixed;
      left: 10px;
      height: 20px;
      top: 24px;
      font-family: PingFang-SC-Medium;
      font-size: 12px;
      color: #fff;
      img{
        width: 14px;
        height: 14px;
        vertical-align: middle;
        margin-right: 5px;
      }
    }
    h3{
      font-family: PingFang-SC-Bold;font-weight: 600;
      font-size: 15px;
      color: #fff;
      padding-top: 80px;
      span{
        font-family: PingFang-SC-Medium;
        font-size: 12px;
      }
    }
  }
}

</style>
